//是否登陆
function getUser() {
    token = localStorage.getItem('token');
    userInfo = {}
    if (token) {
        $.ajax({
            url: '/getUserLogin',
            async: false,
            data: {
                token: token
            },
            type: 'post',
            dataType: 'json',
            success: function(res) {
                if (res.code == 200) {
                    userInfo = res.data
                } else {
                	userInfo = false
                	localStorage.removeItem("token")
                }
            }
        });
        return userInfo;
    } else {
        return false;
    }
}
//动画
function canvas() {
    $('body').after('<script color="255,255,255" count="100" opacity="100" src="/static/canvas-nest.js" zindex="999"></script>');
    $('body').append('<div id="canvas"></div>')
    $('#canvas').load('/html/canvas.html');
}